package com.foreknow.demo7;

public class OverloadDemo {

    public int add(int a,int b) {
        return a + b;
    }

    public void add(int a,int b,int c) {
        System.out.println(a + b + c);
    }

    public static void main(String[] args) {
        OverloadDemo demo = new OverloadDemo();
        int sum = demo.add(1,2);

        demo.add(1,2,3);
        System.out.println(sum);
    }

}
